
#include <cstdint>

enum WEBRTC_AEC_ERROR
{
    WEBRTC_AEC_ERROR_SUCCESS = 0,

    WEBRTC_AEC_ERROR_INVALID_ARGUMENT     = -10001,
    WEBRTC_AEC_ERROR_UNSUPPORT_CLOCK_RATE = -10002,
};

enum WEBRTC_AEC_OPTION {
    WEBRTC_AEC_OPTION_USE_NOISE_SUPPRESSOR  = 0b00000001,
    WEBRTC_AEC_OPTION_USE_GAIN_CONTROLLER   = 0b00000010,
// WEBRTC_AEC_OPTION_USE_ACOUSTIC_ECHO_CANCELLATION = 0b00000100,   // default enabled
};

/**
 * 
 * 
 */
int webrtc_aec3_create(void** pp_entity,
                      uint32_t clock_rate,
                      uint32_t channel_count,
                      uint32_t samples_per_frame,
                      uint32_t tail_ms,
                      uint32_t options);

int webrtc_aec3_destroy(void* p_entity);

int webrtc_aec3_cancel_echo(void* p_entity,
					    int16_t *recv_frame,
					    const int16_t *play_frame);